<template>
  <el-aside class="contribution__aside">
    <el-row>
      <el-avatar :src="avatar" :size="120"></el-avatar>
      <el-row class="contribution__aside__username">{{ name }}</el-row>
    </el-row>
    <el-row>
      <nuxt-link to="/contribution/contribute">
        <el-button type="primary" class="contribution__aside__contribute">
          <i class="el-icon-edit-outline iconfont" />
          投稿
        </el-button>
      </nuxt-link>
    </el-row>
    <el-row class="contribution__aside__content">
      <el-row>
        <nuxt-link to="/contribution/contributed">
          <i class="el-icon-document-checked iconfont" />已投稿
        </nuxt-link>
      </el-row>
      <el-divider></el-divider>
      <el-row>
        <nuxt-link to="/contribution/review">
          <i class="el-icon-tickets iconfont" />审阅中
        </nuxt-link>
      </el-row>
      <el-divider></el-divider>
      <el-row>
        <nuxt-link to="/contribution/returned">
          <i class="el-icon-document-delete iconfont" />已退回
        </nuxt-link>
      </el-row>
    </el-row>
  </el-aside>
</template>

<script>
export default {
  computed: {
    name() {
      return this.$store.state.user.name
    },
    avatar() {
      return this.$store.getters['user/avatar']
    }
  }
}
</script>

<style lang="scss" scoped>
.contribution__aside {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 100px 0px;
  // border-right: 1px solid #ccc;
  > .el-row {
    margin-top: 20px;
  }
}
.contribution__aside__username {
  margin: 20px 0px;
  font-size: 16px;
  text-align: center;
}
.contribution__aside__contribute {
  height: 40px;
  width: 100px;
  & a {
    color: #fff;
  }
}
.contribution__aside__content {
  > .el-row {
    margin: 40px;
    font-size: 20px;
    line-height: 24px;
    color: #505050;
  }
}
</style>
